#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PECL_NAME:=igbinary
PECL_LONGNAME:=PHP extension for interfacing with igbinary

PKG_VERSION:=3.2.16
PKG_RELEASE:=1
PKG_HASH:=8bf25d465abc7973d9e2c9a3039a5f8eea635b23bc1477017ff3999ff95836da

PKG_NAME:=php8_2_lede-pecl-$(PECL_NAME)
PKG_SOURCE:=$(PECL_NAME)-$(PKG_VERSION).tgz
PKG_SOURCE_URL:=http://pecl.php.net/get/

PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>

PKG_LICENSE:=PHP-3.01
PKG_LICENSE_FILES:=COPYING

PKG_BUILD_DIR:=$(BUILD_DIR)/pecl-php8/$(PECL_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include ../php8_2_lede/pecl.mk

CONFIGURE_ARGS+= \
	--enable-igbinary
	
define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include/php8/ext/igbinary/
	$(CP) $(PKG_BUILD_DIR)/src/php7/igbinary.h $(1)/usr/include/php8/ext/igbinary/
endef
	
$(eval $(call PHP8_2_LEDE_PECLPackage,$(PECL_NAME),$(PECL_LONGNAME),+php8_2_lede,25))
$(eval $(call BuildPackage,$(PKG_NAME)))
